|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.framework.interactions.core.support.Widget
org.eclipse.vtp.framework.interactions.voice.vxml.Option
public class Option
The Option class represents the <option> VXML element.
Options are used to enumerate valid inputs within field form elements. The
DTMF of each option can be provided, or one will be assigned by the field
element during processing. A value can be defined that will be assigned to
the field element if the option is selected. A TTS output can associated with
an option that will be played to the caller. Unlike the Choice element, only
TTS is supported.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Option()
Creates a new instance of Option with no DTMF grammar,
value, or TTS output. |
|
Option(BasicOutput output)
Creates a new instance of Option with the specified TTS
output. |
|
Option(BasicOutput output,
java.lang.String dtmf)
Creates a new instance of Option with the specified TTS
output and DTMF grammar. |
|
Option(BasicOutput output,
java.lang.String dtmf,
java.lang.String value)
Creates a new instance of Option with the specified TTS
output, DTMF grammar, and value. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDTMF()
Returns the DTMF grammar that selects this option. |
BasicOutput |
getOutput()
Returns the TTS output that is played to the caller when this option is enumerated to the caller. |
java.lang.String |
getValue()
Returns the value that will be assigned to the field element if this option is selected. |
void |
setDTMF(java.lang.String dtmf)
Sets the DTMF grammar that selects this option. |
void |
setOutput(BasicOutput output)
Sets the TTS output that is played to the caller when this option is enumerated to the caller. |
void |
setValue(java.lang.String value)
Sets the value that will be assigned to the field element if this option is selected. |
protected void |
writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
Write the attribute members of this option to the supplied set. |
protected void |
writeOutput(org.xml.sax.ContentHandler outputHandler)
Write the output in this option to the specified content handler. |
void |
writeWidget(org.xml.sax.ContentHandler outputHandler)
Writes the content of this widget to an XML content handler. |
| Methods inherited from class org.eclipse.vtp.framework.interactions.core.support.Widget |
|---|
toString, writeAttribute, writeChildren, writeChildren, writeWidget, writeWidget |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Option()
Option with no DTMF grammar,
value, or TTS output.
public Option(BasicOutput output)
Option with the specified TTS
output. The DTMF grammar and value fields are initialized to
null.
output - The TTS output to play to the caller.
public Option(BasicOutput output,
java.lang.String dtmf)
throws java.lang.IllegalArgumentException
Option with the specified TTS
output and DTMF grammar. The value field is initialized to
null. Throws an IllegalArgumentException if the dtmf
argument is an empty string.
output - The TTS output to play to the caller.dtmf - The DTMF grammar that selects this option.
java.lang.IllegalArgumentException - If the supplied DTMF value is empty.
public Option(BasicOutput output,
java.lang.String dtmf,
java.lang.String value)
throws java.lang.IllegalArgumentException
Option with the specified TTS
output, DTMF grammar, and value. Throws an IllegalArgumentException if the
dtmf or value arguments are empty strings.
output - The TTS output to play to the caller.dtmf - The DTMF grammar that selects this option.value - The value to assign to the field element if this option is
selected.
java.lang.IllegalArgumentException - If the supplied DTMF value is empty.
java.lang.IllegalArgumentException - If the supplied option value is empty.| Method Detail |
|---|
public BasicOutput getOutput()
public java.lang.String getDTMF()
public java.lang.String getValue()
public void setOutput(BasicOutput output)
output - The TTS output to play to the caller
public void setDTMF(java.lang.String dtmf)
throws java.lang.IllegalArgumentException
dtmf - The DTMF grammar
java.lang.IllegalArgumentException - If the supplied DTMF value is empty.public void setValue(java.lang.String value)
value - The value to assign to the field
java.lang.IllegalArgumentException - If the supplied option value is empty.
public void writeWidget(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
Widget
writeWidget in class WidgetoutputHandler - The handler to write this widget to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing of this widget fails.protected void writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
attributes - The attribute set to write to.
java.lang.NullPointerException - If the supplied attribute set is
null.
protected void writeOutput(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The content handler to write to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing the output fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||